<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>104-布局-定位元素的显示顺序和父元素.html</title>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		.father1{
			width: 300px;
			height: 300px;
			background-color: gray;
			position: relative;
			z-index: 3;
		}
		.son1{
			width: 200px;
			height: 200px;
			background-color: red;
			position: absolute;
			left: 400px;
			top: 200px;
			z-index: 1;
		}
		.father2{
			width: 300px;
			height: 300px;
			background-color: tomato;
			position: relative;
			z-index: 2;
		}
		.son2{
			width: 200px;
			height: 200px;
			background-color: yellow;
			position: absolute;
			left: 420px;
			top: 50px;
			z-index: 10;
		}
	</style>
</head>
<body>
	<div class="father1">
		<div class="son1"></div>
	</div>
	<div class="father2">
		<div class="son2"></div>
	</div>
</body>
</html>